package com.nhjf.model.teachers;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "artPicturesComment")
public class ArtPicturesComment extends BaseModel{
	/**
     * 主键ID
     */
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "native")
    @Column(name = "id", unique = true)
    private Long id;
   /**
    * 作品评论
    */
    @Column(name = "comment")
    private String comment;
    /**
     * 作品id
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "artPicturesId")
    private ArtPictures artPictures;
    /**
     * 评论人类型1老师2学生
     */
    @Column(name = "commentUserType")
    private Integer commentUserType;
    /**
     * 评论人，关联user
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "commentUser")
    private User user;
    /**
     * 评论类型1是文字评论2是语音评论
     */
    @Column(name = "commentType")
    private Integer commentType;
    /**
     * 评论时间
     */
    @Column(name = "commentTime")
    private Date commentTime;
    
	@Transient
	private String commentDate;
	@Transient
	private String avatar;
	@Transient
	private String nickname;
	
	public String getAvatar() {
		return avatar;
	}
	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getCommentDate() {
		return commentDate;
	}
	public void setCommentDate(String commentDate) {
		this.commentDate = commentDate;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public ArtPictures getArtPictures() {
		return artPictures;
	}
	public void setArtPictures(ArtPictures artPictures) {
		this.artPictures = artPictures;
	}
	public Integer getCommentUserType() {
		return commentUserType;
	}
	public void setCommentUserType(Integer commentUserType) {
		this.commentUserType = commentUserType;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Integer getCommentType() {
		return commentType;
	}
	public void setCommentType(Integer commentType) {
		this.commentType = commentType;
	}
	public Date getCommentTime() {
		return commentTime;
	}
	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}
    
    
}
